Skip to content

chore: re-validate patch-package patches for RN 0.83 / Expo 55 - #7474

Merged
diegolmello merged 7 commits into
chore/rn-0.83-expo-55from
native-1237-patches
Jul 9, 2026
Merged

diegolmello merged 7 commits into
chore/rn-0.83-expo-55from
native-1237-patches

Conversation

@diegolmello

@diegolmello diegolmello commented Jul 8, 2026 •

Copy link
Copy Markdown
Member

Proposed changes

Re-validates every patch-package patch against the target versions on the RN 0.83 / Expo SDK 55 upgrade, and unblocks the build where Expo SDK 55 dropped a dependency.

  • Stub expo-av (removed in Expo SDK 55): adds a single no-op shim (app/lib/methods/helpers/expoAvShim.ts) and swaps imports across the audio/video/VoIP-sound call sites, then drops expo-av from package.json. Those media features are intentionally dark for now; restoring them via expo-audio / expo-video is separate follow-up work.
  • Regenerate three stale patches so filenames and hunks match the resolved versions (no more patch-package version-mismatch warnings):
    • expo-font 14.0.10 → 55.0.8 (SDK renumber; native Android font-loader fallback, hunks unchanged)
    • react-native-gesture-handler 2.28.0 → 2.30.1 (native iOS keyboard-focus on RNGestureHandlerButton; insertion point shifted, hunks regenerated to be exact)
    • react-native-webview 13.16.1 → 13.16.0 (regenerated down to the pinned version; Android client-cert / mutual-TLS support)

The other 16 patches were confirmed to apply cleanly against the target versions and left unchanged.

Issue(s)

https://rocketchat.atlassian.net/browse/NATIVE-1237

How to test or reproduce

  1. pnpm install — patch-package should apply all patches with zero version-mismatch warnings.
  2. npx tsc --noEmit — clean.
  3. TZ=UTC pnpm test — green.

Native runtime behavior of the regenerated patches (device audio / gesture / webview) rides the upgrade epic's CI iOS/Android build lanes; this PR's local bar is the compile-level gate.

Screenshots

N/A — build/patch tooling only, no visible UI change.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Targets the upgrade integration branch chore/rn-0.83-expo-55, not develop. react-native-mmkv is out of scope (already resolved to 4.3.1 on the integration branch). No patch was dropped — none of the patched behaviors were upstreamed.

Summary by CodeRabbit

  • Bug Fixes
    • Improved audio/video playback compatibility by routing Expo AV through a compatibility layer across calls, ringtones, attachments, and VOIP sounds.
    • Fixed iOS keyboard/remote activation for gesture buttons so press/release triggers touch events correctly.
  • Tests
    • Updated audio/video mocks in unit and integration tests, plus Jest setup, to align with the new compatibility layer.
  • Chores
    • Removed the direct Expo AV dependency from the app’s dependencies.

Filename was stale (14.0.10 → resolved 55.0.8, Expo SDK 55 renumber).
Hunks are byte-identical across versions (native Android font-loader
fallback); rename resolves the patch-package version-mismatch warning.
Filename was stale (2.28.0 -> resolved 2.30.1). Added iOS keyboard-focus
methods on RNGestureHandlerButton are unchanged, but the insertion point
shifted (hunk @@ -89 -> @@ -82), so hunks were regenerated against 2.30.1
to be exact rather than fuzzy-applied.
Filename was stale-ahead (13.16.1 vs resolved 13.16.0). package.json pins
react-native-webview to exact 13.16.0, so regenerate down to match (no dep
bump). Android client-cert / mutual-TLS hunks are unchanged; only the version
in the filename and the patch index hashes are corrected.
@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fb2dbaa6-b568-4888-a5be-bf3faced6738

📥 Commits

Reviewing files that changed from the base of the PR and between 9a46c61 and 912f90c.

📒 Files selected for processing (1)
  • ios/AppDelegate.swift
📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: ESLint and Test / run-eslint-and-test
🔇 Additional comments (1)
ios/AppDelegate.swift (1)

1-1: Expo SDK 55 AppDelegate migration looks correct.


Walkthrough

This PR adds a local expoAvShim, repoints app code and tests from expo-av to the shim, updates iOS startup wiring to ExpoReactNativeFactory, removes the dependency, and patches react-native-gesture-handler for iOS keyboard focus handling.

Changes

Expo-AV shim replacement

Layer / File(s) Summary
expoAvShim module implementation
app/lib/methods/helpers/expoAvShim.ts
New shim module with AVPlaybackStatus, interruption mode enums, AudioMode/RecordingOptions types, ResizeMode, no-op Audio.Sound/Audio.Recording classes, permission helpers, and a no-op Video component.
Core audio manager and constants
app/lib/constants/audio.ts, app/lib/methods/AudioManager.ts, app/lib/services/voip/playCallEndedSound.ts, app/lib/services/voip/playCallEndedSound.test.ts, app/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx
Core audio APIs and constants switch imports from expo-av to the shim; related test mocks and comments updated accordingly.
UI component consumers
app/containers/AudioPlayer/index.tsx, app/containers/MessageComposer/components/Buttons/MicOrSendButton.tsx, app/containers/MessageComposer/components/RecordAudio/Duration.tsx, app/containers/MessageComposer/components/RecordAudio/RecordAudio.tsx, app/containers/Ringer/index.tsx, app/views/AttachmentView.tsx, app/views/AttachmentView.test.tsx, app/views/ShareView/Preview.tsx, app/views/CallView/index.tsx, app/views/CallView/index.test.tsx, app/views/CallView/components/Dialpad/DialpadContext.tsx
UI components and their tests switch Audio/Video/ResizeMode/AVPlaybackStatus imports from expo-av to the shim; related comments/test descriptions updated.
Dependency and jest cleanup
package.json, jest.setup.js
Removes expo-av dependency and repoints the global jest mock to the shim module.

Expo factory app startup wiring

Layer / File(s) Summary
Expo factory initialization
ios/AppDelegate.swift
AppDelegate changes the Expo import style, updates the factory property type, constructs ExpoReactNativeFactory during launch, and changes the delegate base class.

Gesture handler iOS focus patch

Layer / File(s) Summary
RNGestureHandlerButton keyboard focus handling
patches/react-native-gesture-handler+2.30.1.patch
Adds canBecomeFocused, activation-key detection, and press lifecycle overrides mapping spacebar/return presses to touch control events.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested labels: type: chore

Suggested reviewers: OtavioStasiak

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is clearly related to the PR, highlighting the patch-package revalidation work for the RN 0.83 / Expo 55 upgrade.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (2)
  • NATIVE-1237: Request failed with status code 401
  • EXPO-55: Request failed with status code 401

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The dark expo-av shim declared async methods with no await, tripping the
require-await eslint rule (15 errors, failing CI). Return Promise.resolve()
from plain methods instead — identical return types and behavior, lint clean.
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Expo SDK 55 removed bindReactNativeFactory (expo/expo#39418) and moved
recreateRootView into the factory, and its generated ExpoModulesProvider.swift
now uses `internal import Expo` (SE-0409), making the bare `import Expo`
ambiguous.

- `public import Expo` — explicit access level; public since AppDelegate is a
  public subclass of ExpoAppDelegate
- RCTReactNativeFactory -> ExpoReactNativeFactory (+ delegate base
  RCTDefaultReactNativeFactoryDelegate -> ExpoReactNativeFactoryDelegate)
- drop the removed bindReactNativeFactory call
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

iOS Build Available

Rocket.Chat 4.75.0.109315

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

@diegolmello
diegolmello merged commit 7e350ee into chore/rn-0.83-expo-55 Jul 9, 2026
19 of 24 checks passed
@diegolmello
diegolmello deleted the native-1237-patches branch July 9, 2026 12:28

This branch had an error being deployed

2 failed and 2 inactive deployments
upload_android — 912f90c9 Deployed Jul 8, 2026 by diegolmello via Build Android / Upload Hold #5455
approve_e2e_testing — 912f90c9 Deployed Jul 8, 2026 by diegolmello via E2E Hold #5455
android_build — 912f90c9 Deployed Jul 8, 2026 by diegolmello via Build Android / Hold #5455
ios_build — 912f90c9 Deployed Jul 8, 2026 by diegolmello via Build iOS / Hold #5455
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant